<template>
  <div>
    功能待开发
  </div>
</template>

<script>
export default {
  data () {
    return {
      clientWidth: '',
      clientHeight: ''
    };
  },
  watch: {
    active (val) {
      this.getwidth();
    }
  },
  computed: {
    active () {
      return this.$store.state.isfold;
    }
  },
  mounted () {
    this.getwidth();
  },
  methods: {
    getwidth () {
      const that = this;
      //  ifream默认宽高值
      this.clientHeight = document.documentElement.clientHeight - 115 + 'px';
      if (this.active) {
        this.clientWidth = document.documentElement.clientWidth - 80 + 'px';
      } else {
        this.clientWidth = document.documentElement.clientWidth - 220 + 'px';
      }
      //  缩放窗口事件改变宽高
      window.onresize = function () {
        if (that.active) {
          that.clientWidth = document.documentElement.clientWidth - 100 + 'px';
        } else {
          that.clientWidth = document.documentElement.clientWidth - 220 + 'px';
        }
      };
    }
  }
};
</script>

<style>

</style>
